<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <div th:include="path::sub_path_css" ></div>
</head>
<body class="gray-bg ">
    <div class="gr-dg">
        <form class="form-horizontal m" id="edit_form">
            <input id="id" name="id" type="hidden" th:value="${menu.id}">
            <div class="col-md-12">
                <div class="form-group">
                    <label class="col-sm-2 control-label">父级菜单：</label>
                    <div class="col-sm-9">
                        <input type="text" name="parentText" id="parentText" onclick="showMenuTree()" th:value="${menu.parentText}" class="form-control" readonly="true">
                        <input type="hidden" name="parentId" id="parentId" th:value="${menu.parentId}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">菜单名称：</label>
                    <div class="col-sm-9">
                        <input type="text" name="menuName" id="menuName" th:value="${menu.menuName}" class="form-control" placeholder="请输入菜单名称">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">URL：</label>
                    <div class="col-sm-9">
                        <input type="text" name="url" class="form-control" th:value="${menu.url}" placeholder="请输入URL">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">类型：</label>
                    <div class="col-sm-9 radio i-checks">
                        <label th:each="mentType:${@dictValue.findDictByKey('menu_type')}">
                            <input type="radio" th:text="${mentType.dictText}" th:value="${mentType.dictValue}" name="menuType" th:checked="${menu.menuType eq mentType.dictValue}" > <i></i>
                        </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">打开新页面：</label>
                    <div class="col-sm-9 radio i-checks">
                            <label>
                                <input type="radio" th:checked="${menu.isOpen eq 0}" value="0" name="isOpen"> <i></i> 否
                            </label>
                            <label>
                                <input type="radio" th:checked="${menu.isOpen eq 1}" value="1" name="isOpen"> <i></i>是
                            </label>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">权限PMS：</label>
                    <div class="col-sm-9">
                        <input type="text" name="pms" id="pms" class="form-control" placeholder="" th:value="${menu.pms}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">图标：</label>
                    <div class="col-sm-9 radio i-checks">
                        <label>
                            <input type="radio" checked th:value="${menu.icon}" name="icon"> <i th:class="${menu.icon}"></i>
                        </label>
                        <label>
                            <input type="radio" value="fa fa-user-plus" name="icon"> <i class="fa fa-user-plus"></i>
                        </label>
                        <label>
                            <input type="radio" value="fa fa-wifi" name="icon"> <i class="fa fa-wifi"></i>
                        </label>
                        <label>
                            <input type="radio" value="fa fa-sliders" name="icon"> <i class="fa fa-sliders"></i>
                        </label>
                        <label>
                            <input type="radio" value="fa fa-smile-o" name="icon"> <i class="fa fa-smile-o"></i>
                        </label>
                        <label>
                            <input type="radio" value="fa fa-photo" name="icon"> <i class="fa fa-photo"></i>
                        </label>
                        <label>
                            <input type="radio" value="fa fa-meh-o" name="icon"> <i class="fa fa-meh-o"></i>
                        </label>
                    </div>
                </div>
            </div>
        </form>

    </div>

    <div th:include="path::sub_path_js" ></div>
    <script type="text/javascript" th:src="@{/js/fly-admin/system/menu/edit.js}"></script>
    <script th:inline="javascript">
        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
        var datas = [[${@dictValue.findDictByKey('menu_type')}]];
    </script>
</body>

</html>
